      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Edit Saudara</h4>
      </div>
      <div class="modal-body">

		<?php 
			echo form_open_multipart('mr_saudara/update', array('class' => 'form-horizontal', 'role' => 'form')); 
			foreach ($list as $row){ 
		?>
		<input type="hidden" name="id_mr_saudara" value="<?php echo $row->id_mr_saudara; ?>">

		<div class="form-group">
		<label class="col-sm-3 control-label">Hubungan</label>
		<div class="col-sm-9">
			<label class="radio-inline">
				<input type="radio" name="hubungan" value="Kakak" <?php if ($row->hubungan == 'Kakak'){echo "checked";} ?>>
				Kakak
			</label>

			<label class="radio-inline">
				<input type="radio" name="hubungan" value="Adik" <?php if ($row->hubungan == 'Adik'){echo "checked";} ?>>
				Adik
			</label>
		</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-3 control-label">Nama Lengkap</label>
			<div class="col-sm-7">
				<input type="text" name="nama" class="form-control input-sm" placeholder="Nama Lengkap" value="<?php echo $row->nama; ?>">
			</div>
		</div>

		<div class="form-group">
		<label class="col-sm-3 control-label">Jenis Kelamin</label>
		<div class="col-sm-9">
			<label class="radio-inline">
				<input type="radio" name="jk" value="L" <?php if ($row->jk == 'L'){echo "checked";} ?>>
				Laki-laki
			</label>

			<label class="radio-inline">
				<input type="radio" name="jk" value="P" <?php if ($row->jk == 'P'){echo "checked";} ?>>
				Perempuan
			</label>
		</div>
		</div>

		<div class="form-group">
		<label class="col-sm-3 control-label">Tgl. Lahir</label>
		<div class="col-sm-3">
			<input type="text" name="tgl_lahir" class="form-control input-sm tanggal" placeholder="Tanggal Lahir" value="<?php echo date("d-m-Y", strtotime ($row->tgl_lahir)); ?>">
		</div>
		</div>					  

		<div class="form-group">
		<label class="col-sm-3 control-label">Nama Sekolah</label>
		<div class="col-sm-7">
		  <input type="text" name="nm_sekolah" class="form-control input-sm" placeholder="Nama Sekolah" value="<?php echo $row->nm_sekolah; ?>">
		</div>
		</div>

		<div class="form-group">
		<label class="col-sm-3 control-label">Kelas</label>
		<div class="col-sm-5">
		  <input type="text" name="kelas" class="form-control input-sm" placeholder="Kelas" value="<?php echo $row->kelas; ?>">
		</div>
		</div>
								
		<div class="form-group">
		<div class="col-sm-offset-3 col-sm-9">
			<button type="submit" onClick="validate()" class="btn btn-primary btn-sm">Update</button>
			<button type="reset" class="btn btn-danger btn-sm" data-dismiss="modal" aria-hidden="true">Batal</button>
		</div>
		</div>
		<?php 
			}
			echo form_close();
		?>

  </div>   

<script>
  function validate() {
    $("form").validate({
      rules: {
        nama: {
          required: true
        },
        tgl_lahir: {
          required: true
        },
      },
      messages: {
        nama: {
          required: "Nama harus diisi."
        },
        tgl_lahir: {
          required: "Tanggal lahir harus diisi."
        },
      }
    });

    var topicInputs = topics.find("input").attr("disabled", !inital);
  };
</script>